package com.rock.upms.api.upms.service;

import com.rock.upms.model.dto.PrimaryLoginResult;
import com.rock.upms.model.dto.ThirdComLoginDto;
import com.rock.upms.model.dto.UserDto;

public interface ILoginService {
	/**
	 * 密码登录
	 * @param usercode
	 * @param pwd
	 * @return PrimaryLoginResult
	 */
	PrimaryLoginResult primaryLoginByPassword(String usercode,String pwd);
	/**
	 * 免密登录
	 * @param usercode
	 * @return PrimaryLoginResult
	 */
	PrimaryLoginResult primaryLoginNoPassword(String usercode);
	/**
	 * 登出，通过usercode
	 * @param usercode
	 * @return
	 */
	boolean primaryLogoutByUsercode(String usercode);
	/**
	 * 登出，通过ptoken
	 * @param ptoken
	 * @return
	 */
	boolean primaryLogoutByPToken(String ptoken);
	/**
	 * 第三方登录
	 * @param thirdId
	 * @param thirdCode
	 * @return
	 */
	ThirdComLoginDto thirdComLogin(String thirdId,String thirdComcode );
	/**
	 * 获取当前登录人信息
	 * @param ptoken
	 * @return
	 */
	UserDto getUserByPToken(String ptoken);
	
	
}
